package com.dt76.smallloanbackenduser.remote.afterloan;


import com.dt76.smallloanbackenduser.pojo.afterloan.EWQualification;
import com.dt76.smallloanbackenduser.pojo.afterloan.EarlyWarningInfo;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;


@FeignClient(name = "smallloan-backend-service")
public interface EarlyWarningRemote {

    //对预警信息执行修改操作
    @PostMapping(value = "/earlyWarning/jumpToEarlyEdit", consumes = "application/json")
    public Integer jumpToEarlyEdit(@RequestBody EarlyWarningInfo form);

    //获取分页的预警信息
    @PostMapping(value = "/earlyWarning/getPageEWList", consumes = "application/json")
    public Map<String, Object> getPageEWList(@RequestBody EWQualification q, @RequestParam("currentPage") Integer currentPage, @RequestParam("pageSize") Integer pageSize);

    //根据ID查询预警信息
    @RequestMapping("/earlyWarning/getById")
    public Map<String, Object> getById(@RequestParam("id") String id);

    @PostMapping(value = "/earlyWarning/addEW", consumes = "application/json")
    public Map<String, Object> addEW(@RequestBody EarlyWarningInfo form);

}
